package com.atguigu.serviceedu.controller;

import com.atguigu.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author liangyali
 */
@RestController
@RequestMapping("eduservice/user/")
@CrossOrigin//解决跨域
public class EduLoginController {

    /**
     * 返回值：token
     * @return
     */
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R getInfo(){
        return R.ok().data("roles","[admin]").data("name","[admin]").data("avator","");
    }
}
